<?php
$this->breadcrumbs = array (
	'Edited Reports' => array (
		'index'
	),
	$model->id,

	
);

$this->menu = array (
	array (
		'label' => 'List EditedReport',
		'url' => array (
			'index'
		)
	),
	array (
		'label' => 'Generate report',
		'url' => '#',
		'linkOptions' => array (
			'onclick' => '$("#mydialog").dialog("open"); return false;'
		)
	),
	array (
		'label' => 'Create EditedReport',
		'url' => array (
			'create'
		)
	),
	array (
		'label' => 'Update EditedReport',
		'url' => array (
			'update',
			'id' => $model->id
		)
	),
	array (
		'label' => 'Delete EditedReport',
		'url' => '#',
		'linkOptions' => array (
			'submit' => array (
				'delete',
				'id' => $model->id
			),
			'confirm' => 'Are you sure you want to delete this item?'
		)
	),
	array (
		'label' => 'Manage EditedReport',
		'url' => array (
			'admin'
		)
	),

	
);
?>

<h1>View EditedReport #<?php echo $model->id; ?></h1>

<?php


$this->widget('zii.widgets.CDetailView', array (
	'data' => $model,
	'attributes' => array (
		'id',
		'report_id',
		'edition_date',
		'edition_user',
		'filename',
		'type',
		'project_id',

		
	),

	
));
?>
<?php


$this->beginWidget('zii.widgets.jui.CJuiDialog', array (
	'id' => 'mydialog',
	// additional javascript options for the dialog plugin
	'options' => array (
		'title' => 'Dialog box 1',
		'autoOpen' => false
	)
));

echo 'Generation du fichier en cours ' . $this->createUrl('default/render', array (
	'id' => $model->id
));

$this->endWidget('zii.widgets.jui.CJuiDialog');

Yii::app()->clientScript->registerScript('mydialog_ajax', '$("#mydialog").bind( "dialogopen", function(event, ui) {
   	$.ajax({
   		type: "POST",
  		url: "' . $this->createUrl('default/render', array (
	'id' => $model->id
)) .
'",
   		success: function(msg){ 
   		    $("#mydialog").dialog("close");
     		alert( "Data Saved: " + msg );
   		}
 	})
});');
?>
